<?php echo $this->render('global/uploader.phtml'); ?>

<?php 
$this->headScript()->appendFile($this->baseUrl().'/public/js/ckeditor.js' ); 
echo $this->inlineScript()->setScript(' 
$(document).ready(function(){
	CKEDITOR.replaceAll( "textarea", {
			toolbar : [ [ "Source", "-", "Bold", "Italic", "Underline", "Strike","TextColor","-","Link","Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak" ] ],
			width: 600
		}
	); 

});
');
?>

<?php if($this->send) { ?>
	
	<table>
		<tr>
			<td>
				<a class="button" href="javascript:void(null)" onclick="$('#formitem').submit()">
					<div style="background:url(<?php echo $this->baseUrl() ?>/public/images/save_16.png);" class="inb">Wyślij</div>
				</a>
			</td>
		</tr>
	</table>
	<form id="formitem" method="post">
	<div class="bglist">
		<div class="bglistq">
			<table cellspacing="1" cellpadding="6" class="tform">
				<tr>
					<td class="lb">Grupa, do której ma pójść mail</td>
					<td class="inpy">
						<?php echo  $this->formSelect('type', 'newsletter', null, array('newsletter'=>'Użytkownicy newslettera', 'all'=>'Wszyscy', 'ranga'=>'Użytkownicy poszczególnej rangi')) ?>
					</td>
				</tr>
				<tr id="show">
					<td class="lb">Wybierz rangę cenową</td>
					<td class="inpy">
						<?php echo  $this->formSelect('rank', '1', null, array('1','2','3','4','5')) ?>
					</td>
				</tr>
				<tr>
					<td class="lb">Treść po polsku</td>
					<td class="inpy"><textarea class="textarea" name="body_pl"></textarea></td>
				</tr>
				<tr>
					<td class="lb">Treść po angielsku</td>
					<td class="inpy"><textarea class="textarea" name="body_en"></textarea></td>
				</tr>
				<tr>
					<td class="lb">Treść po czesku</td>
					<td class="inpy"><textarea class="textarea" name="body_cs"></textarea></td>
				</tr>
			</table>
		</div>
	</div>
	</form>
	<?php 
}
else
{
	?>
	Newsletter jest w tej chwili wysyłany.
	<?php 	
}